package com.hlg.xboot.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.hlg.xboot.vo.QueryKeyWordVO;

import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * <p>Description: 所有模型的顶级基类</p>
 * <p>Copyright: Copyright (c) 2016</p>
 * <p>Company: 中视数讯</p>
 * <p>Site: www.digi-zones.com</p>
 * <p>myblog: http://blog.csdn.net/xyang81</p>
 *
 * @author 杨信
 * @version 1.0
 * @date 2017/5/8
 */
@MappedSuperclass
public class AbstractModel implements Serializable {

    /**
     * 搜索关键词
     */
    @Transient
    @JsonIgnore
    protected QueryKeyWordVO keyword;

    /**
     * 日期范围关键词
     */
    @Transient
    @JsonIgnore
    protected Map<String,Object> ranges = new HashMap<>();

    /**
     * 搜索类型
     */
    @Transient
    @JsonIgnore
    protected Map<String, Integer> queryType = new HashMap<>();

    public QueryKeyWordVO getKeyword() {
        return keyword;
    }

    public void setKeyword(QueryKeyWordVO keyword) {
        this.keyword = keyword;
    }

    public Map<String, Object> getRanges() {
        return ranges;
    }

    public void setRanges(Map<String, Object> ranges) {
        this.ranges = ranges;
    }

    public Map<String,Object> transformListModel() {
        return new HashMap<>();
    }

    public Map<String, Integer> getQueryType() {
        return queryType;
    }

    public void setQueryType(Map<String, Integer> queryType) {
        this.queryType = queryType;
    }
}
